----------------------------------
--      Module Declaration      --
----------------------------------

local boss = BB["Jedoga Shadowseeker"]
local mod = BigWigs:New(boss, tonumber(("$Revision: 543 $"):sub(12, -3)))
if not mod then return end
mod.partycontent = true
mod.otherMenu = "Dragonblight"
mod.zonename = BZ["Ahn'kahet: The Old Kingdom"]
mod.enabletrigger = boss
mod.guid = 29310
mod.toggleoptions = {"thundershock","thundershockBar","bosskill"}

----------------------------------
--         Localization         --
----------------------------------

local L = AceLibrary("AceLocale-2.2"):new("BigWigs"..boss)

L:RegisterTranslations("enUS", function() return {
	cmd = "Jedoga",
	thundershock = "Thundershock",
	thundershockBar = "Thundershock Bar",
	thundershockBar_desc = "Show a bar for the duration of Jedoga Shadowseeker's Thundershock.",
	thundershock_desc = "Warn when Jedoga Shadowseeker casts Thundershock.",
}

end )

L:RegisterTranslations("deDE", function() return {
	cmd = "Jedoga",
	thundershock = "Donnerschock",
	thundershockBar = "Donnerschock-Anzeige",
	thundershockBar_desc = "Eine Leiste für die Dauer von Donnerschock anzeigen.",
	thundershock_desc = "Warnung wenn Jedoga Schattensucher ihren Donnerschock zaubert.",
}

end )

L:RegisterTranslations("esES", function() return {
}

end )

L:RegisterTranslations("esMX", function() return {
}

end )

L:RegisterTranslations("frFR", function() return {
	cmd = "Jedoga",
	thundershock = "Coup de tonnerre",
	thundershockBar = "Coup de tonnerre - Barre",
	thundershockBar_desc = "Affiche une barre indiquant la durée du Coup de tonnerre de Jedoga Cherchelombre.",
	thundershock_desc = "Prévient quand Jedoga Cherchelombre incante son Coup de tonnerre.",
}

end )

L:RegisterTranslations("koKR", function() return {
	cmd = "제도가",
	thundershock = "천둥 충격",
	thundershockBar = "천둥 충격 바",
	thundershockBar_desc = "어둠 추적자 제도가의 천둥 충격이 지속되는 바를 표시합니다.",
	thundershock_desc = "어둠 추적자 제도가의 천둥 충격 시전을 알립니다.",
}

end )

L:RegisterTranslations("ruRU", function() return {
	cmd = "Джедога",
	thundershock = "Громовой удар",
	thundershockBar = "Полоса Громового удара",
	thundershockBar_desc = "Отображать полосу продолжительности Громовых ударов Джедога.",
	thundershock_desc = "Предупреждать, когда Джедога Искательница Теней начинает применение Громового удара.",
}

end )

L:RegisterTranslations("zhCN", function() return {
	thundershock = "雷霆震击",
	thundershockBar = "雷霆震击计时条",
	thundershockBar_desc = "当耶戈达·觅影者的雷霆震击持续时显示计时条。",
	thundershock_desc = "当耶戈达·觅影者施放雷霆震击时发出警报。",
}

end )

L:RegisterTranslations("zhTW", function() return {
	cmd = "潔杜佳",
	thundershock = "雷霆震擊",
	thundershockBar = "雷霆震擊計時條",
	thundershockBar_desc = "當潔杜佳·尋影者的雷霆震擊持續時顯示計時條。",
	thundershock_desc = "當潔杜佳·尋影者施放雷霆震擊時發出警報。",
}

end )

----------------------------------
--        Initialization        --
----------------------------------

function mod:OnEnable()
	self:AddCombatListener("SPELL_CAST_SUCCESS", "Thundershock", 56926, 60029)
	self:AddCombatListener("UNIT_DIED", "BossDeath")
end

----------------------------------
--        Event Handlers        --
----------------------------------

function mod:Thundershock(_, spellId, _, _, spellName)
	if self.db.profile.thundershock then
		self:IfMessage(spellName, "Important", spellId)
	end
	if self.db.profile.thundershockBar then
		self:Bar(spellName, 10, spellId)
	end
end
